<admintpl file="header" />
<style>
.well{font-size:12px;}
select, textarea, input[type="text"], input[type="password"], input[type="datetime"], input[type="datetime-local"], input[type="date"], input[type="month"], input[type="time"], input[type="week"], input[type="number"], input[type="email"], input[type="url"], input[type="search"], input[type="tel"], input[type="color"], .uneditable-input{
padding:0px;
}
.table>thead>tr>th{border-bottom:none;}
</style>
</head>
<body>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a href="javascript:;">球队列表</a></li>
		</ul>
		<form class="well form-search" method="post" action="admin.php?g=Admin&m=Homesys&a=index">
            <input type="text" id="search_name" name="name" style="width:180px;" value="{$postData['name']}" placeholder="请输入球队名称"> 
			<input type="submit" class="btn btn-primary" value="搜索" /> &nbsp;&nbsp;
		</form>
		<form class="js-ajax-form" action="" method="post">
			<table class="table table-hover table-bordered table-list">
				<thead>
					<tr>
						<th width="30">球队 ID</th>
						<th width="90">球队名称</th>
						<th width="60">球队类型</th>
						<th width="60">地区</th>
						<th width="60">队长姓名</th>
						<th width="90">队长手机号</th>
						<th width="90">创建时间</th>
						<th width="60">操作</th>
					</tr>
				</thead>
				<foreach name="thedata" item="data">
					<tr>
						<td><b>{$data['id']}</b></td>
						<td><b>{$data['name']}</b></td>
						<td><b>{$data['qtype']}</b></td>
						<td><b>{$data['diqu']}</b></td>
						<td><b>{$data['dname']}</b></td>
						<td><b>{$data['dphone']}</b></td>
						<td><b>{$data['createtime']}</b></td>
						<td>
							<a href="admin.php?g=Admin&m=homesys&a=list&id={$data['id']}&p={$postData['p']}">队员列表</a>
							&nbsp;&nbsp;&nbsp;
							<a style="color:red" href="ex-qiu.php?id={$data['id']}">下载队员列表</a>
						</td>
					</tr>	
				</foreach>			
			</table>
			<div class="pagination">{$page}</div>
		</form>
	</div>
	<script src="public/js/common.js"></script>
	<script>
		$(function() {
			setCookie("refersh_time", 0);
			Wind.use('ajaxForm', 'artDialog', 'iframeTools', function() {
				//批量复制
				$('.js-articles-copy').click(function(e) {
					var ids=[];
					$("input[name='ids[]']").each(function() {
						if ($(this).is(':checked')) {
							ids.push($(this).val());
						}
					});
					
					if (ids.length == 0) {
						art.dialog.through({
							id : 'error',
							icon : 'error',
							content : '您没有勾选信息，无法进行操作！',
							cancelVal : '关闭',
							cancel : true
						});
						return false;
					}
					
					ids= ids.join(',');
					art.dialog.open("/index.php?g=portal&m=AdminPost&a=copy&ids="+ ids, {
						title : "批量复制",
						width : "300px"
					});
				});
				//批量移动
				$('.js-articles-move').click(function(e) {
					var ids=[];
					$("input[name='ids[]']").each(function() {
						if ($(this).is(':checked')) {
							ids.push($(this).val());
						}
					});
					
					if (ids.length == 0) {
						art.dialog.through({
							id : 'error',
							icon : 'error',
							content : '您没有勾选信息，无法进行操作！',
							cancelVal : '关闭',
							cancel : true
						});
						return false;
					}
					
					ids= ids.join(',');
					art.dialog.open("/admin.php?g=portal&m=AdminPost&a=move&old_term_id=0&ids="+ ids, {
						title : "批量移动",
						width : "300px"
					});
				});
			});
		});
	</script>
</body>
</html>